package com.mayikt;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class AppSpringBoot {
    @Value("${server.port}")
    private String port;

    // 127.0.0.1/jz
    @RequestMapping("/")
    public String index() {
        return "springboot2.0:" + port;
    }

    // 127.0.0.1/jz/test
    @RequestMapping("/test")
    public String test() {
        return "java";
    }


    public static void main(String[] args) {
        SpringApplication.run(AppSpringBoot.class, args);
    }

}
